﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Se.Log
{
    /// <summary>
    /// 日志
    /// </summary>
    public static class SeLog
    {
        static SeLog()
        {
            InitLog();
        }

        public static void InitLog(SeLogLevel minLevel = SeLogLevel.Debug, bool isConsoleWrite = true, SeLogLevel maxLevel = SeLogLevel.Fatal)
        {
            Logger = new SeLogger(minLevel, maxLevel, isConsoleWrite);
        }


        private static SeLogger Logger;

        public static void Debug(string message, params object[] objs)
        {
            Logger.Debug(message, objs);
        }

        public static void Info(string message, params object[] objs)
        {
            Logger.Info(message, objs);
        }

        public static void Warn(string message, params object[] objs)
        {
            Logger.Warn(message, objs);
        }

        public static void Error(string message, params object[] objs)
        {
            Logger.Error(message, objs);
        }

        public static void Fatal(string message, params object[] objs)
        {
            Logger.Fatal(message, objs);
        }

        public static void Sql(string message, params object[] objs)
        {
            Logger.Sql(message, objs);
        }

        public static void Request(string message, params object[] objs)
        {
            Logger.Request(message, objs);
        }

        public static void Response(string message, params object[] objs)
        {
            Logger.Response(message, objs);
        }

        public static void Login(string message, params object[] objs)
        {
            Logger.Login(message, objs);
        }

        public static void Register(string message, params object[] objs)
        {
            Logger.Register(message, objs);
        }
    }
}
